;!function($) {
  var methods = {
    animate: function(elements) {
      $.each(elements, function() {
        var elementAnimation = $(this).data('animate') || 'fadeInUp',
          elementDuration = $(this).data('duration'),
          elementDelay = $(this).data('delay'),
          elementIteration = $(this).data('iteration');

        $(this).css({'-webkit-animation-duration': elementDuration, 'animation-duration': elementDuration});
        $(this).css({'-webkit-animation-delay': elementDelay, 'animation-delay': elementDelay});
        $(this).css({'-webkit-animation-iteration-count': elementIteration, 'animation-iteration-count': elementIteration});
        $(this).css('visibility', 'visible');
        $(this).addClass(elementAnimation);
        $(this).addClass('animated');
      });
    }
  };
  $.fn.animation = function() {
    methods.animate(this);
  };
}(window.jQuery);
